package com.haircut.project.dao.record;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.haircut.project.model.record.ProjectRecord;
import com.haircut.project.vo.record.*;
import com.haircut.project.vo.statistics.SalaryReqVo;
import com.haircut.project.vo.statistics.SalayResVo;
import com.haircut.project.vo.statistics.StatisProjectVo;
import com.haircut.project.vo.statistics.StatsUserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProjectRecordMapper extends BaseMapper<ProjectRecord> {

    Page<ApiRecordResVo> findPage(IPage<?> reqPage,@Param("reqVo") ApiRecordReqVo reqVo);

    Page<RecordResVo> findManagerPage(IPage<?> reqPage, @Param("reqVo") RecordReqVo reqVo);
    RecordResVo findManagerStatic(@Param("reqVo") RecordReqVo reqVo);

    /**
     * 查询上次发工资的时间
     * @return
     */
    List<SalaryQueryResVo> findUnSalary(@Param("reqVo") SalaryQueryVo reqVo);

    /**
     * 计算工资
     * @param reqPage
     * @param reqVo
     * @return
     */
    List<ProjectRecord> findSalaryCalsPage(IPage<?> reqPage,@Param("reqVo") SalaryQueryVo reqVo);

    /**
     * 查询首页的工资统计
     * @param reqVo
     * @return
     */
    List<SalayResVo> findSalaryStatic(@Param("reqVo") SalaryReqVo reqVo);

    Page<StatisProjectVo> findProjectRankPage(IPage<?> reqPage, @Param("reqVo") SalaryReqVo reqVo);


    Page<StatsUserVo> findUserRankPage(IPage<?> reqPage, @Param("reqVo") SalaryReqVo reqVo);

}
